<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="common/head.jsp" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
  <head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="Content-Style-Type" content="text/css">
	<meta http-equiv="Content-Script-Type" content="text/javascript">
	<title>化合物综合搜索</title>
	<link rel="stylesheet" href="${ctx }/common/css/version4.css" type="text/css">
	<link rel="stylesheet" href="${ctx }/common/css/import.css" type="text/css" media="screen,print">
	<link rel="stylesheet" href="${ctx }/common/css/jquery-ui.css" type="text/css">
	<script src="${ctx }/common/js/jquery.js" type="text/javascript"></script>
	<script src="${ctx }/common/js/jquery-ui.js" type="text/javascript"></script>
	<script type="text/javascript" src="${ctx }/common/js/common.js"></script>
<script language="javascript">
function jmeInit()
{
	var jmeparam="multipart,hydrogens,query,number,rbutton";
	document.JME.options(jmeparam);
}
function filechange()
{ 
		document.all.jmedraw.style.display="none";
		document.all.uploadfile.style.display=""
}
		
//-->
function drawingchange()
{ 
		document.all.jmedraw.style.display="";
		document.all.uploadfile.style.display="none"
		
}
//-->
function getMol() 
{	
 		document.JMEForm.smiles.value = document.JME.smiles();
 		if(document.JMEForm.smiles.value.length == 0){
		    	alert("Please draw a molecule")
		    	return false;
		 }
	    document.JMEForm.jme.value = document.JME.jmeFile();
	    alert(document.JMEForm.smiles.value+"------"+document.JMEForm.jme.value)
	    document.JMEForm.submit();
	    return true;
 }
// -->
//LastMol显示上一次输入的结构，用session保存变量
function LastMol() 
{
	  var draw= document.jmeform.drawing.value;
          document.JME.readMolFile(draw);
          return false;
          
 }
// -->
//LastMol清空当前输入的结构 by daijf 20080825
function ClearMol() 
{
	  //var draw2= "";
          document.JME.reset();
          return false;
          
 }
</script>
</HEAD>
<BODY background="../Images/chemback_s.jpg" bgproperties="fixed" leftmargin=0 topmargin=10 onload=jmeInit() id="catalog">
<div class="topHeader">
  <div class="topHeader">
  <div class="wrap960">
		<!-- 快速链接 S-->
    	<ul class="sg_tits2 fr">
			<li class="noPadd"><a href="javascript:void(0)" onclick="SetHome(this,'http://localhost/chemSearch/');" target="_self">加入收藏</a></li>
		</ul>
<%  
	
	if(session.getAttribute("userLogin")==null){ %>
		<div class="fl" id="loginF">
			<span class="welcome2">用户快速登陆</span>
			<!-- 选择去向 S-->
			<div class="hasGone">
				<form method="post" target="_self" name="login_form" id="login_form" action="#">
				<!-- 登录前显示、登录后隐藏 S-->
				<div class="fl">
					<input class="inp2 w100 colGray" name="user" id="login_user" value="用户名" onfocus="if(this.value == '用户名'){this.value = '';$(this).removeClass('colGray');}" onblur="if(this.value == ''){this.value = '用户名';$(this).addClass('colGray');}" type="text">

                    <input style="display: block;" class="inp2 w85 colGray jsclass_pw_t" value="请输入密码" type="text">
                    <input class="inp2 w85 colGray jsclass_pw_p" name="pwd" id="login_pwd" style="display: none;" type="password">
                    
					<input name="method" value="checktop" type="hidden">
					<input name="returnUrl" id="returnUrl" value="" type="hidden">
					<input name="sign" value="s" type="hidden">
					<input style="display: none;" id="submit" type="submit">
				</div>
				<a href="javascript:void(0);" class="hbtnA" onclick="login();" target="_self" id="btn_login">登录</a>
			    </form>
		  </div>
			<!-- 选择去向 E-->
		</div>
<%}
	else {%>
		<!-- 登陆后状态 S-->
		<div class="fl" id="loginL">
			<!-- 登陆后 -->
			<span class="welcome2" id="welcomeText">您好，欢迎使用化学结构式检索系统</span>
			<!-- 选择去向 S-->
			<div class="hasGone">
				 <form name="Form2" action="${pageContext.request.contextPath}/manage/user/loginOut.do">
				<input type="submit" class="hbtnA" id="logoutBtn" value="退出"/>	  
				<input type= "hidden" name= "url" id= "url" value= "<%=request.getRequestURL()%>">
			</form>	
			</div>
			<!-- 选择去向 E-->
		</div>
	<%}
%>

 </div>
</div>
	<div id="wrapper">
	    <!-- Header Start -->
	<div id="header">
	<a href="#"><img src="${ctx }/common/images/logo1.gif" ></a>
	</div>
	<div id="nav">
    	<a href="${ctx }/search.jsp" class="nav">化合物综合检索</a>  |  
    	<a href="${ctx }/structure_search.jsp" class="nav">化合物结构式检索</a>  |  
        <a href="${ctx }/name_search.jsp" class="nav">化合物名称检索</a>  |  
        <a href="${ctx }/cas_search.jsp" class="nav">CAS号检索</a>  |  
        <a href="${ctx }/formula_search.jsp" class="nav">分子式检索</a>
    </div>

    	<div id="main">
	    <h1>化合物综合检索</h1>
	    <h2>请点击上传MOL文件进行检索！</h2>
	    <br />  
<hr size="1" width="100%"><font class="small">
  
<p align="center"><input type=button value="上载MOL文件检索" onclick=filechange() style="WIDTH: 120px;  HEIGHT: 21px;" size=16 name=btnfile>
<input type=button value="输入分子结构检索" onclick=drawingchange() style="WIDTH: 120px; HEIGHT: 21px" size=16 name=btndrawing></p>
  
  <!--提交文件检索-->     
<div id=uploadfile style="DISPLAY: none" ><br>
<P align=center style="color:red;">MOL文件上传（将检索的化合物结构文件上传到服务器）&nbsp;</P><br />
<center>
<FORM name="form1" METHOD="POST" ACTION="analysisMol.jsp" ENCTYPE="multipart/form-data">
选择MOL文件：&nbsp;<INPUT id="attach" type="file" name="attach" src="" accept="*.mol"> 
<INPUT id=submit  type=submit  value="提交查询" name=submit size=9>&nbsp;<INPUT id=reset  type=reset value="清除文件"  >
</form>
</center>

<INPUT name=limit type=hidden value="full">
<input type=hidden name=maxFileSize value=11000>
 <p></p><br><br>
<p>

<!--
<table class=newform bordercolor="#BFBDDF" border="1" cellspacing=1 width=360  align=center>
  <tr><td colspan="3">有需要立体化学匹配的，请选择需匹配的立体结构信息：</td>
  </tr>
  <tr>
  <td><input type="checkbox" name="S_CHANDBSET">链键 </td>
  <td><input type="checkbox" name="S_RNGDBSET" >环键</td>
  <td><input type="checkbox" name="S_EZLABSET" >E/Z标示</td>  
  </tr>
  <tr>
  <td><input type="checkbox" name="S_STBNDSET" >立体键</td> 
  <td><input type="checkbox" name="S_RSLABSET" >R/S表示</td>
  <td><input type="checkbox" name="S_FISCHSET" >Fischer</td>
  </tr>
  <tr>
  <td><input type="checkbox" name="S_GLUESET" >醣环</td>
  <td><input type="checkbox" name="S_AXILSET" >双键轴</td>
  <td><input type="checkbox" name="S_ATROPSET">阻转</td>
  </tr>
  </table>
  -->
</p>

<table border=0 cellspacing=0 width="60%" align=center>
<tr>
<td style="font-size:0.8em">注意事项：</td>
</tr>
<tr>
<td style="font-size:0.8em">(1) 检索方法：将待检索的化合物mol文件上载即可检索,也  可点击分子结构检索按钮,输入结构图检索</td>
</tr>
<tr>
<td style="font-size:0.8em">(2) mol 文件为MDL公司的规定结构图文件,chemoffice软件生成的mol文件目前无法解析，请使用isis_draw软件绘制mol文件</td>
</tr>
<tr>
<td style="font-size:0.8em">(3) mol文件小于1M</td>
</tr>
</table>




</div><!--第二层 通过分子结构图检索-->

<div id=jmedraw ><br>
<div class="javaaplet" align="center">
            <applet name="JME" code="JME.class" codebase="applet-classes" archive="JME.jar" width="470" height="312">
              <param name="options" value="multipart">
              <param name="jme" value="">
              <p style="color:#ff0000; font-weight:bold; text-align:center">请使用Java浏览器<br />如您还未安装Java软件，请点击此处下载（免费）。<br /><a href="http://java.com/java/download/index.jsp?cid=jdp101954"><img width="88" height="31" border="0" style="margin:8px" alt="GetJava Download Button" title="GetJava" src="http://java.com/en/img/everywhere/getjava_sm.gif?cid=jdp101954"></a></p>
            </applet>
            <p align="center"><a href="http://www.molinspiration.com/jme/">JME Editor</a> courtesy of Peter Ertl, Novartis</p>
            <p>本查询功能不能区分顺反异构体及对映异构体。<br />例如，绘制R-型的结构并检索后，结果将会是R-型，S-型以及消旋混合物都显示出来</p>
    </div>
    <form name="JMEForm" action="${ctx }/search/structure_search.do" method="post" >
       <div class="searchDIV" align="center">
       <input type="button" value="提交检索" onClick="getMol(); return false;" class="formbtn_en" style="width:150px" /> 
            <input type=hidden name=drawing value="">&nbsp;&nbsp;&nbsp;
			<input type=button  value="清空输入"  onclick="return ClearMol()">
            <input type="hidden" name="smiles" />
            <input type="hidden" name="jme" />
            <input type="hidden" name="type" />
       </div>
    </form>
<form name=jmeform action="${ctx }/search/structure.do" method="post">

 <input type=hidden name=mol>
 <input type=hidden name=upload value="jme">
 <input type=hidden name=limit value="full">
 <input type=hidden name=mol_database value=>
  <p></p><br>
 <p><!--
<table class=newform bordercolor="#BFBDDF" border="1" cellspacing=1 width=360  align=center>
  <tr><td colspan="3">有需要立体化学匹配的，请选择需匹配的立体结构信息：</td>
  </tr>
  <tr>
  <td><input type="checkbox" name="S_CHANDBSET" >链键 </td>
  <td><input type="checkbox" name="S_RNGDBSET" >环键</td>
  <td><input type="checkbox" name="S_EZLABSET" >E/Z标示</td>
  </tr>
  <tr>
  <td><input type="checkbox" name="S_STBNDSET" >立体键</td>
  <td><input type="checkbox" name="S_RSLABSET" >R/S标示</td>
  <td><input type="checkbox" name="S_FISCHSET" >Fischer</td>
  </tr>
  <tr>
  <td><input type="checkbox" name="S_GLUESET" >醣环</td>
  <td><input type="checkbox" name="S_AXILSET" >双键轴</td>
  <td><input type="checkbox" name="S_ATROPSET" >阻转</td>
  </tr>
  </table>
  -->
</form></P>
</div></font>





</td>
</tr>
<tr>

</table><!-- 第三个大table -->
</FORM>

</BODY>
</HTML>

